﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Diagnostics;

namespace AssignmentsManage.Windows
{
    /// <summary>
    /// Interaction logic for AboutWindow.xaml
    /// </summary>
    public partial class AboutWindow : Window
    {
        public AboutWindow()
        {
            InitializeComponent();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
            Version version = assembly.GetName().Version;

            lblVersion.Content = String.Format(lblVersion.Content.ToString(), version.Major, version.Minor, version.Build);
            this.Title = String.Format(this.Title, assembly.GetName().Name);
            lblTitle.Content = assembly.GetName().Name;
        }

        private void Hyperlink_Click(object sender, RoutedEventArgs e)
        {
            Process webProc = new Process();
            webProc.StartInfo.FileName = ((Hyperlink)sender).NavigateUri.OriginalString;
            webProc.Start();
        }
    }
}
